; get the OS version number (34=1.3, 36=2.0, 37=2.1, etc)
(set vernum (getversion))
(set vernum (/ vernum 65536))
(set filesOk 0)
(if (exists "scripts" (noreq))
(if (exists "scripts/JForth_Scripts" (noreq))
(if (exists "scripts/C_Scripts" (noreq))
(if (exists "scripts/HSPascal_Scripts" (noreq))
(if (exists "scripts/SASC_Scripts" (noreq))
(if (exists "docs" (noreq))
(if (exists "Textra" (noreq))
(if (exists "Textra.info" (noreq))
(if (exists "Fonts" (noreq))
(set filesOk 1)
)))))))))
(if (= filesOk 0)
(exit "\n\nSorry, the Textra Installer cannot function as some of the required files or directories are missing.")
)
(set AppDirName
(askdir
(prompt "Please choose the drawer in which the Textra executable (and its icon) should be installed...")
(help (cat "You may run Textra from anywhere. It does not need any specific assigns.\n\n" @askdir-help))
(default "Work:")
; (newpath)
)
)
(set @default-dest AppDirName)
(if (= (getversion "libs:rexxsyslib.library") 0)
(
(if (askbool
(prompt "\nARexx does not seem to be installed on your system.\n\nDo you want to install the Textra-ARexx scripts anyway?")
(help "After you install ARexx, Textra will expect these files to reside in whatever drawer you assign as \"REXX:\"...")
)
)
(set usesARexx 1)
(set usesARexx 0)
)
(set usesARexx 1)
)
(if (= usesARexx 1)
(if (exists "rexx:" (noreq))
(set RexxDirName "rexx:")
(set RexxDirName
(askdir
(prompt "Please choose the drawer in which the Textra-Arexx scripts should be installed \(normally REXX: but you do not have it assigned\)...")
(help @askdir-help)
(default "Work:TextraScripts")
(newpath)
)
)
)
)
(if (askbool
(prompt "\nDo you want to copy the Textra documentation to your hard disk?\n\nIt is several files totaling around 140k and is very detailed and complete.")
(help "\nThe documentation covers Textra as an editor, how to use the provided Arexx scripts (also writing your own), complete version history, much more. Many files have MARKs defined for them.\n\nHighly recommended for beginners.")
)
(
(set DocsDirName
(askdir
(prompt "Please choose the drawer in which the Textra documentation should be installed...")
(help @askdir-help)
(default "Work:TextraDocs")
(newpath)
)
)
(set usesDocs 1)
)
(
(set usesDocs 0)
)
)
(set LangOptions (askoptions
(prompt "Programmers...\n\nThe Textra package includes a few ARexx scripts that are language-specific. That is, there are different sets for different languages.\n\nCheck any languages that you program in...")
(help @askoptions-help)
(choices "JForth Professional 3.x" "HS/Pascal" "C language")
(default 0)
)
)
(if (BITAND LangOptions 1)
(set usesJForth 1)
(set usesJForth 0)
)
(if (BITAND LangOptions 2)
(set usesHSPascal 1)
(set usesHSPascal 0)
)
(if (BITAND LangOptions 4)
(
(set usesC 1)
(if (askbool
(prompt "\n\nDo you use SAS/C?")
(help "\nIn addition to general-use C scripts, the package includes some specific interface scripts to fully integrate Textra with the SAS/C compiler!")
)
(set usesSASC 1)
(set usesSASC 0)
)
)
(
(set usesC 0)
(set usesSASC 0)
)
)
(set activateSASC 0)
(if (= usesSASC 1)
(if (askbool
(prompt "\nYou can use Textra as a replacement for 'SE' (the SAS-provided editor).\n\nThe Textra package contains a configuration file (SCMSG) which informs SAS/C to automatically use Textra.\n\n Do you want to install it now?")
(help "\nAnwering 'Yes' activates Textra as the default SAS/C editor. The next time you launch SAS/C, it will use Textra.\n\nAnswering 'No' causes no SAS/C configuration changes to occur.")
)
(set activateSASC 1)
)
)
(set promptStr ("Operations to perform:\n----------------------\n\nCopy Textra and icon to %s\n\nCopy Textra.font to fonts:" AppDirName))
(if (= usesDocs 1)
(set promptStr ("%s\n\nCopy the Textra Docs to %s" promptStr DocsDirName))
)
(if (= usesARexx 1)
(set usesARexxStr ("\n\nCopy the Textra-ARexx scripts to %s" RexxDirName))